using System;
using System.Data.Entity.ModelConfiguration;
using System.Data.Common;
using System.Data.Entity;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using DomainLayer.Data.Entities;

namespace Infrastructure.Data.Mapping
{
	public class OutBoundDetailMap : EntityTypeConfiguration<OutBoundDetail>
	{
		public OutBoundDetailMap()
		{
			// Primary Key
			this.HasKey(t => t.OutBoundDtlID);

			// Properties
			this.Property(t => t.CustomOrderNO)
				.HasMaxLength(20);
				
			this.Property(t => t.GoodName)
				.HasMaxLength(50);
				
			// Table & Column Mappings
			this.ToTable("OutBoundDetail");
			this.Property(t => t.OutBoundDtlID).HasColumnName("OutBoundDtlID");
			this.Property(t => t.OutBoundNo).HasColumnName("OutBoundNo");
			this.Property(t => t.WayBillNO).HasColumnName("WayBillNO");
			this.Property(t => t.CustomOrderNO).HasColumnName("CustomOrderNO");
			this.Property(t => t.GoodNO).HasColumnName("GoodNO");
			this.Property(t => t.GoodWeight).HasColumnName("GoodWeight");
			this.Property(t => t.GoodName).HasColumnName("GoodName");
			this.Property(t => t.CreatBy).HasColumnName("CreatBy");
			this.Property(t => t.CreatStation).HasColumnName("CreatStation");
			this.Property(t => t.CreatTime).HasColumnName("CreatTime");
			this.Property(t => t.UpdateBy).HasColumnName("UpdateBy");
			this.Property(t => t.UpdateStation).HasColumnName("UpdateStation");
			this.Property(t => t.UpdateTime).HasColumnName("UpdateTime");
			this.Property(t => t.IsDelete).HasColumnName("IsDelete");
		}
	}
}

